user = {'cisco':'cisco','chris':'cisco123'}

err = 0
while True:
    authuser = raw_input('username:')
    if authuser in user.keys():
        authpass = raw_input('password:')
        if authpass == user[authuser]:
            print 'welcom login this router!'
            print 'R108-HX-001'              #跳至login完成主菜单界面 调用 def mian
        else:
            err +=1
            print 'password err,please reture login.'
            if err >= 3:
                break
    else:
        err +=1
        print 'username is not in service,please call system administrator'
        if err >= 3:
            print 'login error,system login out'
            break